<%%= simple_form_for([:admin, @<%= singular_table_name %>], html: {class: 'layui-form'}) do |f| %>
  <%%= f.error_notification %>

  <%- attributes.each do |attribute| -%>
    <div class="layui-form-item">
      <%%= f.label :<%= attribute.name %>, class: 'layui-form-label' %>
      <div class="layui-input-block">
        <%%= f.<%= attribute.reference? ? :association : :input_field %> :<%= attribute.name %>, class: 'layui-input', autocomplete: 'off', placeholder: <%= singular_table_name.classify %>.human_attribute_name(:<%= attribute.name %>) %>
      </div>
    </div>
  <%- end -%>

  <div class="actions">
    <%%= f.submit t('buttons.save'), data: { disable_with: "保存中..." }, class: 'layui-btn' %>
    <%%= link_to t('buttons.cancel'), url_for(:back), class: 'layui-btn layui-btn-normal' %>
  </div>
<%% end %>
